The present invention relates to the field of computer graphics. The human visual system can perceive images with extraordinary fidelity under a wide variety of lighting conditions. Dynamic range is the difference between the dimmest light and the brightest light that the human visual system can differentiate under a given lighting condition. For example, light values below the lower threshold of the dynamic range will all be perceived as black, while light values above the upper threshold will all be perceived as white. As lighting conditions change, the human visual system quickly adapts its dynamic range to the lighting conditions to maximize the perception of visual information.
Many computer graphic images are created by mathematically modeling the interaction of light with a three dimensional scene from a given viewpoint. This process, called rendering, generates a two-dimensional image of the scene from the given viewpoint, and is analogous to taking a photograph of a real-world scene. As the demand for computer graphics, and in particular for real-time computer graphics, has increased, specialized hardware for accelerating the rendering process has become widespread.
Typical display devices, for example computer monitors, have a very limited dynamic range as compared to the human visual system. If the rendering process generates pixel values exceeding the dynamic range of the display device, the details of the resulting image will be either too bright or too dark to be displayed correctly, similar to an overexposed or underexposed photograph.
The problems associated with the limited dynamic range of display devices are exacerbated as real-time rendering applications shift to floating-point rendering from integer rendering. In floating point rendering, each pixel is represented by one or more floating-point formatted values. Floating point formatted numbers can represent numbers over a much wider range than similarly sized integer formatted numbers. This allows applications to use more complicated rendering algorithms and to avoid the numerical rounding errors introduced by successive calculations on integer valued pixels. Because floating-point rendering greatly increases the numerical range of pixel values, the limited dynamic range of display devices becomes an even greater burden.
To compensate for the limited dynamic range of display devices, the mathematical model used by the rendering software can be modified so that the pixel values of the rendered image fall within the dynamic range of the display device. However, this approach requires application developers to extensively fine-tune the lighting in each scene, and decreases the visual quality of the rendered images. Alternatively, the rendered images can be adjusted in software to remap the dynamic range of the image to the dynamic range of the display device. However, this approach can be computationally intensive, making it unsuitable for real-time rendering applications.
It is desirable for computer graphics hardware to automatically adjust floating-point valued images to the dynamic range of the display device. It is also desirable for this adjustment to be performed with minimal computational burden on the software application, and without the need to manually fine-tune the lighting for each scene.